

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Change Log &mdash; pywinauto v0.4.1 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.4.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="pywinauto v0.4.1 documentation" href="index.html" />
    <link rel="next" title="Main user modules" href="code/code.html" />
    <link rel="prev" title="PYWINAUTO TODO’s" href="TODO.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="code/code.html" title="Main user modules"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="TODO.html" title="PYWINAUTO TODO’s"
             accesskey="P">previous</a> |</li>
        <li><a href="contents.html">pywinauto v0.4.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="change-log">
<h1>Change Log<a class="headerlink" href="#change-log" title="Permalink to this headline">¶</a></h1>
<div class="section" id="various-cleanup-and-bug-fixes">
<h2>0.4.0 Various cleanup and bug fixes.<a class="headerlink" href="#various-cleanup-and-bug-fixes" title="Permalink to this headline">¶</a></h2>
<p>03-April-2010</p>
<blockquote>
<div><ul class="simple">
<li>Gracefully Handle dir() calls on Application or WindowSpecification objects
(which used hang for a while as these classes would search for windows
matching __members__, __methods__ and __bases__). The code now checks for
any attribute that starts with &#8216;__&#8217; and ends with &#8216;__&#8217; and raises
AttributeError immediately. Thanks to Sebastian Haase for raising this.</li>
<li>Removed the reference to an Application object in WindowSpecification.
It was not used in the class and made the class harder to use.
WindowSpecification is now more useful as a utility class.</li>
<li>Add imports of application.WindowSpecification and application.Application
to pywinauto.__init__.py so that these classes can be used more easily
(without having to directly import pywinauto.application). Thanks again to
Sebastian Haase.</li>
<li>Added a function to empty the clipboard (thanks to Tocer on Sourceforge)</li>
<li>Use &#8216;SendMessageTimeout&#8217; to get the text of a window. (SendMessage will hang
if the application is not processing messages)</li>
<li>Fixed references to PIL.ImageGrab. PIL add&#8217;s it&#8217;s module directly to the
module path, so it should just be referenced by ImageGrab and not
PIL.ImageGrab.</li>
<li>Use AttachThreadInput + PostMessage rather than SendMessageTimeout to send
mouse clicks.</li>
<li>Fix how timeout retry times are calculated in timings.WaitUntil() and
timings.Wait</li>
<li>Fixed some issues with application.Kill_() method, highlighted due to the
changes in the HwndWrapper.Close() method.</li>
<li>Fix writing images to XML. It was broken with updates to PIL that I had not
followed. Changed the method of knowing if it is an image by checking for
various attributes.</li>
<li>Renamed WindowSpecification.(Ww)indow() to ChildWindow() and added
deprecation messages for the other functions.</li>
<li>Improved the tests (fixed test failures which were not pywinauto issues)</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="experimental-new-sendkeys-and-various-fixes">
<h2>0.3.9 Experimental! New Sendkeys, and various fixes<a class="headerlink" href="#experimental-new-sendkeys-and-various-fixes" title="Permalink to this headline">¶</a></h2>
<p>27-November-2009</p>
<blockquote>
<div><ul class="simple">
<li>Major change this release is that Sendkeys is no longer a requirement!
A replacement that supports Unicode is included with pywinauto. (hopefully
soon to be released as a standalone module). Please note - this is still
quite untested so this release should be treated with some care..</li>
<li>Made sure that default for WindowSpecification.Window_() was to look
for non top level windows. The defaults in find_windows() had been
changed previously and it now needed to be explicitly overridden.</li>
<li>Fixed a missing reference to &#8216;win32defines&#8217; when referencing WAIT_TIMEOUT
another typo of false (changed to False)</li>
<li>Removed the restriction to only get the active windows for the process,
now it will be possible to get the active windows, even if a process is
not specified.
From <a class="reference external" href="http://msdn.microsoft.com/en-us/library/ms633506%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/ms633506%28VS.85%29.aspx</a>
it gets the active window for the foreground thread.</li>
<li>Hopefully improved Delphi TreeView and ListView handling (added window
class names as supported window classes to the appropriate classes).</li>
<li>Added support for running UI tests with reference controls. (requried
for some localization tests)</li>
<li>Various PyLint and PEP8 fixes made.</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="collecting-improvements-from-last-2-years">
<h2>0.3.8 Collecting improvements from last 2 years<a class="headerlink" href="#collecting-improvements-from-last-2-years" title="Permalink to this headline">¶</a></h2>
<p>10-March-2009</p>
<blockquote>
<div><ul class="simple">
<li>Fixed toolbar button pressing - This required for
HwndWrapper.NotifyParent() to be updated (to accept a new
ID parameter)</li>
<li>Fixed a bug wherea listview without a column control would
make pywinauto fail to capture the dialog.</li>
<li>Converted documenation from Pudge generated to Sphinx Generated</li>
<li>Added some baic support for Pager and Progress controls
(no tests yet)</li>
<li>Added some more VB &#8216;edit&#8217; window classes</li>
<li>Added some more VB &#8216;listbox&#8217; window classes</li>
<li>Added some more VB &#8216;button&#8217; window classes</li>
<li>Ensured that return value from ComboBoxWrapper.SelectedIndices
is always a tuple (there was a bug where it would sometimes be
a ctypes array)</li>
<li>Changed default for finding windows to find disabled windows
as well as enabled ones (previous was to find enabled windows only)
(note this may impact scripts that relied on the previous
setting i.e. in cases where two dialogs have the same title!)</li>
<li>Much better handling of InvalidWindowHandle during automation
runs. This could be raised when a closing window is still available
when the automation was called, but is gone half way through
whatever function was called.</li>
<li>Made clicking more robust by adding a tiny wait between each
SendMessageTimeout in _perform_click().</li>
<li>Added attributes <tt class="docutils literal"><span class="pre">can_be_label</span></tt> and <tt class="docutils literal"><span class="pre">has_title</span></tt> to <tt class="docutils literal"><span class="pre">HwndWrapper</span></tt>
and subclasses to specify whether a control can act as a label for
other controls, and whether the title should be used for identifying
the control. If you have created your own HwndWrapper subclasses you
may need to override the defaults.</li>
<li>Added a <tt class="docutils literal"><span class="pre">control_id</span></tt> parameter to find_windows which allows
finding windows based off of their control id&#8217;s</li>
<li>Added a FriendlyClassName method to MenuItem</li>
<li>Split up the functions for button truncation data</li>
<li>Commented out code to get a new font if the font could not
be recovered</li>
<li>Moved code to get the control font from Truncation test to
handleprops</li>
<li>Added a function to get the string representation of the
bug. (need to refactor PrintBugs at some point).</li>
<li>Fixed a variable name (from fname -&gt; font_attrib as fname
was not a defined variable!)</li>
<li>Forced some return values from MissingExtraString test
to be Unicode</li>
<li>Fixed the MiscValues test (converted to Unicode and
removed some extraneous characters)</li>
<li>Updated the path for all unittests</li>
<li>Made two unit tests sligthly more robust and less dependent
on computer/app settings</li>
<li>Updated timing settings for unit tests</li>
<li>Updated the examples to work in dev environment.</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="merge-of-wait-changes-and-various-bug-fixes-improvements">
<h2>0.3.7 Merge of Wait changes and various bug fixes/improvements<a class="headerlink" href="#merge-of-wait-changes-and-various-bug-fixes-improvements" title="Permalink to this headline">¶</a></h2>
<p>10-April-2007</p>
<ul class="simple">
<li>Added Timings.WaitUntil() and Timings.WaitUntilPasses() which
handle the various wait until something in the code. Also
refactored existing waits to use these two methods.</li>
<li>Fixed a major Handle leak in RemoteMemorBlock class (which is
used extensively for &#8216;Common&#8217; controls. I was using OpenHandle
to open the process handle, but was not calling CloseHandle()
for each corresponding OpenHandle().</li>
<li>Added an active_() method to Application class to return the
active window of the application.</li>
<li>Added an &#8216;active&#8217; option to WindowSpecification.Wait() and
WaitNot().</li>
<li>Some cleanup of the clipboard module. GetFormatName()
was improved and GetData() made a little more robust.</li>
<li>Added an option to findwindows.find_windows() to find only
active windows (e.g. active_only = True). Default is False.</li>
<li>Fixed a bug in the timings.Timings class - timing values are
Now accessed through the class (Timings) and not through the
intance (self).</li>
<li>Updated ElementTree import in XMLHelpers so that it would work
on Python 2.5 (where elementtree is a standard module) as well
as other versions where ElementTree is a separate module.</li>
<li>Enhanced Item selection for ListViews, TreeViews - it is now
possible to pass strings and they will be searched for. More
documentation is required though.</li>
<li>Greatly enhanced Toolbar button clicking, selection, etc.
Though more documentation is required.</li>
<li>Added option to ClickInput() to allow mouse wheel movements
to be made.</li>
<li>menuwrapper.Menu.GetProperties() now returns a dict like all other
GetProperties() methods. This dict for now only has one key
&#8216;MenuItems&#8217; which contains the list of menuitems (which had been
the previous return value).</li>
</ul>
</div>
<div class="section" id="b-changes-not-documented-in-0-3-6-history">
<h2>0.3.6b Changes not documented in 0.3.6 history<a class="headerlink" href="#b-changes-not-documented-in-0-3-6-history" title="Permalink to this headline">¶</a></h2>
<p>31-July-2006</p>
<ul class="simple">
<li>Fixed a bug in how findbestmatch.FindBestMatches was working.
It would match against text when it should not!</li>
<li>Updated how timings.Timings.Slow() worked, if any time setting
was less then .2 after &#8216;slowing&#8217; then set it to .2</li>
</ul>
</div>
<div class="section" id="scrolling-and-treview-item-clicking-added">
<h2>0.3.6 Scrolling and Treview Item Clicking added<a class="headerlink" href="#scrolling-and-treview-item-clicking-added" title="Permalink to this headline">¶</a></h2>
<p>28-July-2006</p>
<ul class="simple">
<li>Added parameter to <tt class="docutils literal"><span class="pre">_treeview_item.Rectangle()</span></tt> to have an option
to get the Text rectangle of the item. And defaulted to this.</li>
<li>Added <tt class="docutils literal"><span class="pre">_treeview_item.Click()</span></tt> method to make it easy to click
on tree view items.</li>
<li>Fixed a bug in <tt class="docutils literal"><span class="pre">TreeView.GetItem()</span></tt> that was expanding items
when it shouldn&#8217;t.</li>
<li>Added <tt class="docutils literal"><span class="pre">HwndWrapper.Scroll()</span></tt> method to allow scrolling. This
is a very minimal implementation - and if the scrollbars are
implemented as separate controls (rather then a property of a
control - this will probably not work for you!). It works for
Notepad and Paint - that is all I have tried so far.</li>
<li>Added a call to <tt class="docutils literal"><span class="pre">HwndWrapper.SetFocus()</span></tt> in
<tt class="docutils literal"><span class="pre">_perform_click_input()</span></tt> so that calls to
<tt class="docutils literal"><span class="pre">HwndWrapper.ClickInput()</span></tt> will make sure to click on the
correct window.</li>
</ul>
</div>
<div class="section" id="moved-to-metaclass-control-wrapping">
<h2>0.3.5 Moved to Metaclass control wrapping<a class="headerlink" href="#moved-to-metaclass-control-wrapping" title="Permalink to this headline">¶</a></h2>
<p>24-May-2006</p>
<ul class="simple">
<li>Moved to a metaclass implementation of control finding. This
removes some cyclic importing that had to be worked around and
other then metaclass magic makes the code a bit simpler.</li>
<li>Some of the sample files would not run - so I updated them
so they would (Thanks to Stefaan Himpe for pointing this out)</li>
<li>Disabled saving application data (it was still being saved in
Application.RecordMatch() even if the rest of the application
data code is disabled. This was causing what appeared to be a
memory leak where pywinauto would keep grabbing more and more
memory (especially for controls that contain a lot of
information). Thanks to Frank Martinez for leading me to this).</li>
<li>Added ListViewWrapper.GetItemRect() to enable retrieving the
rectangle for a particular item in the listview.</li>
<li>Removed references to _ctrl() method within pywinauto as it
was raising a DeprecationWarning internally even if the user
was not using it.</li>
</ul>
</div>
<div class="section" id="fixed-issue-with-latest-ctypes-speed-gains-other-changes">
<h2>0.3.4 Fixed issue with latest ctypes, speed gains, other changes<a class="headerlink" href="#fixed-issue-with-latest-ctypes-speed-gains-other-changes" title="Permalink to this headline">¶</a></h2>
<p>25-Apr-2006</p>
<ul class="simple">
<li>The latest version of ctypes (0.9.9.6) removed the code generator
I was using some generated code in win32functions.py (stdcall). I
was not using those functions so I just commented them out.</li>
<li>Started the process of renaming methods of the <tt class="docutils literal"><span class="pre">Application</span></tt> and
<tt class="docutils literal"><span class="pre">WindowSpecification</span></tt> classes. I will be converting names to
<tt class="docutils literal"><span class="pre">UppercaseNames_()</span></tt>. The trailing <tt class="docutils literal"><span class="pre">_</span></tt> is to disambiguate the
method names from potential Window titles.</li>
<li>Updated how print_control_identifiers works so that it now always
prints the disambiguated control name. (even for single controls)</li>
<li>Added __hash__ to HwndWrapper so that controls could be dictionary
keys.</li>
<li>Caching various information at various points. For example I cache
how well two pieces of text match. For short scripts this has
little impact - but for larger script it could well have a major
impact.
Also caching information for controls that cannot change
e.g. TopLeveParent, Parent, etc</li>
</ul>
</div>
<div class="section" id="added-some-methods-and-fixed-some-small-bugs">
<h2>0.3.3 Added some methods, and fixed some small bugs<a class="headerlink" href="#added-some-methods-and-fixed-some-small-bugs" title="Permalink to this headline">¶</a></h2>
<p>19-Apr-2006</p>
<ul class="simple">
<li>Added a wait for the control to be active and configurable
sleeps after &#8216;modifying&#8217; actions (e.g. Select, Deselect, etc)</li>
<li>Fixed Timings.Slow() and Timings.Fast() - they could in certain
circumstances do the opposite! If you had already set a timing
slower or faster then they would set it then they would blindly
ignore that and set their own times. I added functionality that
they will take either the slowest or fastest of the new/current
setting rather then blindly setting to the new value.</li>
<li>Fixed some hidden bugs with HwndWrapper.CloseClick()</li>
<li>Fixed a bug in setup.py that would raise an error when no
argument was specified</li>
<li>Added an argument to HwndWrapper.SendMessageTimeout so that
the wait options could be passed in.</li>
<li>Added HwndWrapper.Close(), Maximize(), Minimize(), Restore()
and GetShowState().</li>
<li>Commented out all deprecated methods (will be removed completely
in some future release).</li>
<li>Added Application.kill_() method - which closes all windows and
kills the application. If the application is asking if you want
to save your changes - you will not be able to click yes or no
and the application will be killed anyway!.</li>
</ul>
</div>
<div class="section" id="fixed-setup-py-and-some-typos">
<h2>0.3.2 Fixed setup.py and some typos<a class="headerlink" href="#fixed-setup-py-and-some-typos" title="Permalink to this headline">¶</a></h2>
<p>31-Mar-2006</p>
<ul class="simple">
<li>Fixed the spelling of Stefaan Himpe&#8217;s name</li>
<li>Fixed setup.py which was working for creating a distribution but
not for installing it (again thanks to Stefaan for pointing it out!)</li>
</ul>
</div>
<div class="section" id="performance-tune-ups">
<h2>0.3.1 Performance tune-ups<a class="headerlink" href="#performance-tune-ups" title="Permalink to this headline">¶</a></h2>
<p>30-Mar-2006</p>
<ul class="simple">
<li>Change calculation of distance in findbestmatch.GetNonTextControlName()
so that it does not need to square or get the square root to
find the real distance - as we only need to compare values - not have
the actual distance. (Thanks to Stefaan Himpe)</li>
<li>Compiled regular expression patterns before doing the match to
avoid compiling the regular expression for window that is being
tested (Thanks to Stefaan Himpe)</li>
<li>Made it easier to add your own control tests by adding a file
extra_tests.py which needs to export a ModifyRegisteredTests() method.
Also cleaned up the code a little.</li>
<li>Updated notepad_fast.py to make it easier to profile (adde a method)</li>
<li>Changed WrapHandle to use a cache for classes it has matched - this is
to avoid having to match against all classes constantly.</li>
<li>Changed default timeout in SendMessageTimeout to .001 seconds from .4
seconds this results in a significant speedup. Will need to make this
value modifiable via the timing module/routine.</li>
<li>WaitNot was raising an error if the control was not found - it should
have returned (i.e. success - control is not in any particular state
because it does not exist!).</li>
<li>Added ListViewWrapper.Deselect() per Chistophe Keller&#8217;s suggestion.
While I was at it I added a check on the item value passed in and added
a call to WaitGuiIdle(self) so that the control has a chance to process
the message.</li>
<li>Changed doc templates and moved dependencies into pywinauto
subversion to ensure that all files were availabe at www.openqa.org and
that they are not broken when viewed there.</li>
<li>Moved all timing information into the timings.Timings class. There are
some simple methods for changing the timings.</li>
</ul>
</div>
<div class="section" id="added-application-data-now-useful-for-localization-testing">
<h2>0.3.0 Added Application data - now useful for localization testing<a class="headerlink" href="#added-application-data-now-useful-for-localization-testing" title="Permalink to this headline">¶</a></h2>
<p>20-Mar-2006</p>
<ul>
<li><p class="first">Added automatic Application data collection which can be used when
running the same test on a different spoken language version. Support
is still preliminary and is expected to change. Please treat as early
Alpha.</p>
<p>If you have a different language version of Windows then you can try
this out by running the notepad_fast.py example with the langauge
argument e.g.</p>
<div class="highlight-python"><pre>examples\notepad_fast.py language</pre>
</div>
<p>This will load the application data from the supplied file
notepad_fast.pkl and use it for finding the right menu items and
controls to select.</p>
</li>
<li><p class="first">Test implementation to make it easier to start using an application.
Previously you needed to write code like</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">app</span> <span class="o">=</span> <span class="n">Application</span><span class="p">()</span><span class="o">.</span><span class="n">connect_</span><span class="p">(</span><span class="n">title</span> <span class="o">=</span> <span class="s">&#39;Find&#39;</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">Find</span><span class="o">.</span><span class="n">Close</span><span class="o">.</span><span class="n">Click</span><span class="p">()</span>
<span class="n">app</span><span class="o">.</span><span class="n">NotePad</span><span class="o">.</span><span class="n">MenuSelect</span><span class="p">(</span><span class="s">&quot;File-&gt;Exit&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>1st change was to implement static methods <tt class="docutils literal"><span class="pre">start()</span></tt> and
<tt class="docutils literal"><span class="pre">connect()</span></tt>. These methods return a new Application instance
so the above code becomes:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">app</span> <span class="o">=</span> <span class="n">Application</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">title</span> <span class="o">=</span> <span class="s">&#39;Find&#39;</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">Find</span><span class="o">.</span><span class="n">Close</span><span class="o">.</span><span class="n">Click</span><span class="p">()</span>
<span class="n">app</span><span class="o">.</span><span class="n">NotePad</span><span class="o">.</span><span class="n">MenuSelect</span><span class="p">(</span><span class="s">&quot;File-&gt;Exit&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>I also wanted to make it easier to start working with a simple
application - that may or may not have only one dialog. To make this
situation easier I made <tt class="docutils literal"><span class="pre">window_()</span></tt> not throw if the application has not
been <tt class="docutils literal"><span class="pre">start()ed</span></tt> or <tt class="docutils literal"><span class="pre">connect()ed</span></tt> first. This leads to simpler code
like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">app</span> <span class="o">=</span> <span class="n">Application</span><span class="p">()</span>
<span class="n">app</span><span class="o">.</span><span class="n">Find</span><span class="o">.</span><span class="n">Close</span><span class="o">.</span><span class="n">Click</span><span class="p">()</span>
<span class="n">app</span><span class="o">.</span><span class="n">NotePad</span><span class="o">.</span><span class="n">MenuSelect</span><span class="p">(</span><span class="s">&quot;File-&gt;Exit&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>What happens here is that when you execute any of Application.window_(),
Application.__getattr__() or Application.__getitem__() when the
application hasn&#8217;t been connected or started. It looks for the window
that best matches your specification and connects the application to
that process.</p>
<p>This is extra functionality - existing connect_() and
start_() methods still exist</p>
</li>
<li><p class="first">Fixed HwndWrapper.SetFocus() so that it would work even if the window
was not in the foreground. (it now makes the window foreground as well
as giving it focus). This overcomes a restriction in Windows where
you can only change the foreground window if you own the foreground
window.</p>
</li>
<li><p class="first">Changed some 2.4&#8217;isms that an anonymous commenter left on my blog :-)
with these changes pywinauto should run on Python 2.3 (though I haven&#8217;t
done extensive testing).</p>
</li>
<li><p class="first">Commented out controls.common_controls.TabControlWrapper.GetTabState()
and TabStates() as these did not seem to be returning valid values anyway.</p>
</li>
<li><p class="first">Fixed documentation issues were parts of the documentation were not
getting generated to the HTML files.</p>
</li>
<li><p class="first">Fixed issue where MenuSelect would sometimes not work as expected.
Some Menu actions require that the window that owns the menu be active.
Added a call to SetFocus() before selecting a menu item to ensure that
the window was active.</p>
</li>
<li><p class="first">Fixed Bug 1452832 where clipboard was not closed in clipboard.GetData()</p>
</li>
<li><p class="first">Added more unit tests now up to 248 from 207</p>
</li>
</ul>
</div>
<div class="section" id="more-refactoring-more-tests">
<h2>0.2.5 More refactoring, more tests<a class="headerlink" href="#more-refactoring-more-tests" title="Permalink to this headline">¶</a></h2>
<p>07-Mar-2006</p>
<ul>
<li><p class="first">Added wrapper classes for Menus and MenuItems this enabled cleaner
interaction with Menu&#8217;s. It also gives more functionality - you can now
programmatically Click() on menus, and query if a menu item is checked
or not.</p>
</li>
<li><p class="first">Added application.WindowSpecification.Wait() and WaitNot() methods.
These methods allow you to wait for a control to exist, be visible,
be enabled, be ready (both enabled and visible!) or to wait for the
control to not be in any of these states. WaitReady(),
WaitNotEnabled(), WaitNotVisible() now use these methods. I was able to also
add the missing methods WaitNotReady(), WaitEnabled(), WaitVisible(),
WaitExists(), WaitnotExists(). Please use Wait() and WaitNot() as I have
Deprecated these Wait* methods.</p>
</li>
<li><p class="first">Slightly modified timeout waits for control resolution so that a timed
function more accurately follows the timeout value specified.</p>
</li>
<li><p class="first">Added application.Application.start() and connect() static methods. These
methods are factory methods in that they will return an initialized Application
instance. They work exactly the same as start_() and connect() as they are
implemented in terms of those.</p>
<blockquote>
<div><p>from pywinauto.application import Application
notepad = Application.start(&#8220;notepad&#8221;)
same_notepad = Application.connect(path = &#8220;notepad&#8221;)</p>
</div></blockquote>
</li>
<li><p class="first">Updated the examples to follow changes to the code - and to make them a little
more robust.</p>
</li>
<li><p class="first">Added a new Controls Overview document page which lists all the actions on
all controls.</p>
</li>
<li><p class="first">Added more unit tests now up to 207 from 134 (added 68 tests)</p>
</li>
</ul>
</div>
<div class="section" id="small-release-number-big-changes">
<h2>0.2.1 Small Release number - big changes<a class="headerlink" href="#small-release-number-big-changes" title="Permalink to this headline">¶</a></h2>
<p>17-Feb-2006</p>
<ul>
<li><p class="first">Quick release to get many changes out there - but this release has
been less tested then I would like for a .3 release.</p>
</li>
<li><p class="first">Allow access to non text controls using the closest Text control.
This closest text control will normally be the static/label associated
with the control. For example in Notepad, Format-&gt;Font dialog, the 1st
combobox can be refered to as &#8220;FontComboBox&#8221; rather than &#8220;ComboBox1&#8221;</p>
</li>
<li><p class="first">Added a new control wrapper - <tt class="docutils literal"><span class="pre">PopupMenuWrapper</span></tt> for context menu&#8217;s
You can now work easily with context menu&#8217;s
e.g.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">app</span><span class="o">.</span><span class="n">Notepad</span><span class="o">.</span><span class="n">Edit</span><span class="o">.</span><span class="n">RightClick</span><span class="p">()</span>
<span class="c"># need to use MenuClick rather then MenuSelect</span>
<span class="n">app</span><span class="o">.</span><span class="n">PopupMenu</span><span class="o">.</span><span class="n">MenuClick</span><span class="p">(</span><span class="s">&quot;Select All&quot;</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">Notepad</span><span class="o">.</span><span class="n">Edit</span><span class="o">.</span><span class="n">RightClick</span><span class="p">()</span>
<span class="n">app</span><span class="o">.</span><span class="n">PopupMenu</span><span class="o">.</span><span class="n">MenuClick</span><span class="p">(</span><span class="s">&quot;Copy&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>I could think of merging the <tt class="docutils literal"><span class="pre">RightClick()</span></tt> and <tt class="docutils literal"><span class="pre">MenuSelect()</span></tt> into one method
<tt class="docutils literal"><span class="pre">ContextMenuSelect()</span></tt> if that makes sense to most people.</p>
</li>
<li><p class="first">Added Support for Up-Down controls</p>
</li>
<li><p class="first">Not all top level windows now have a FriendlyClassName of &#8220;Dialog&#8221;.
I changed this because it made it hard to get windows of a particular
class. For example the main Notepad window has a class name of &#8220;Notepad&#8221;.</p>
<p>This was primarily implemented due to work I did getting the System Tray.</p>
</li>
<li><p class="first">Renamed <tt class="docutils literal"><span class="pre">StatusBarWrapper.PartWidths()</span></tt> to <tt class="docutils literal"><span class="pre">PartRightEdges()</span></tt> as this
is more correct for what it returns.</p>
</li>
<li><p class="first">Changed HwndWrapper.Text() and SetText() to WindowText() and
SetWindowText() respectively to try and make it clearer that it is
the text returned by GetWindowText and not the text that is visible
on the control. This change also suggested that EditWrapper.SetText()
be changed to SetEditText() (though this is not a hard requirement
EditWrapper.SetText() still exists - but may be deprecated.</p>
</li>
<li><p class="first">Added ClickInput, DoubleClickInput, RightClickInput, PressMouseInput
ReleaseMouseInput to HwndWrapper - these use SendInput rather then
WM_LBUTTONDOWN, WM_RBUTTONUP, etc used by Click, DoubleClick etc.</p>
<p>I also added a MenuClick method that allows you to click on menu
items. This means you can now &#8216;physically&#8217; drop menus down.</p>
</li>
<li><p class="first">Some further working with tooltips that need to be cleaned up.</p>
</li>
<li><p class="first">Fixed a bug where coordinates passed to any of the Click operations had
the X and Y coordinates swapped.</p>
</li>
<li><p class="first">Added new MenuItem and Menu classes that are to the most part hidden
but you can get a menu item by doing</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">app</span><span class="o">.</span><span class="n">Notepad</span><span class="o">.</span><span class="n">MenuItem</span><span class="p">(</span><span class="s">&quot;View&quot;</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">Notepad</span><span class="o">.</span><span class="n">MenuItem</span><span class="p">(</span><span class="s">&quot;View-&gt;Status Bar&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>MenuItems have various actions so for example you can use
<tt class="docutils literal"><span class="pre">MenuItem.IsChecked()</span></tt> to check if the menu item is checked.
Among other methods there are <tt class="docutils literal"><span class="pre">Click()</span></tt> and <tt class="docutils literal"><span class="pre">Enabled()</span></tt>.</p>
</li>
<li><p class="first">Modified the &#8216;best match&#8217; algorithm for finding controls.
It now searches a couple of times, and tries to find the best
fit for the text passed to it. The idea here is to make it more
&#8220;Select what I want - not that other thing that looks a bit like
what I want!&#8221;. It is possible this change could mean you need to
use new identifiers in scripts - but in general very little modification
should be necessary.</p>
<p>There was also a change to the algorithm that looked for the closest
text control. It missed some obvious controls in the previous
implementation. It also had a bug for controls above the control
rather than to the left.</p>
</li>
<li><p class="first">Added a new example scripts SaveFromInternetExplorer.py and
SaveFromFirefox.py which show automating downloading of a page
from either of these browsers.</p>
</li>
<li><p class="first">Added yet more unit tests, there are now a total of 134 tests.</p>
</li>
</ul>
</div>
<div class="section" id="significant-refactoring">
<h2>0.2.0 Significant refactoring<a class="headerlink" href="#significant-refactoring" title="Permalink to this headline">¶</a></h2>
<p>06-Feb-2006</p>
<ul>
<li><p class="first">Changed how windows are searched for (from application)
This chage should not be a significant change for users</p>
</li>
<li><p class="first">Started adding unit tests (and the have already uncovered bugs
that been fixed). They also point to areas of missing functionality
that will be addded with future updates</p>
</li>
<li><p class="first">Changed from property access to Control attributes to function access
If your code was accessing properties of controls then this might be a
significant change! The main reasons for doing this were due to the
inheritability of properties (or lack there-of!) and the additional
scafolding that was required to define them all.</p>
</li>
<li><p class="first">Updated the <tt class="docutils literal"><span class="pre">DialogWrapper.MenuSelect()</span></tt> method to notify the parent
that it needs to initialize the menu&#8217;s before it retrieves the items</p>
</li>
<li><p class="first">Added functionality to associate &#8216;non-text&#8217; controls with the &#8216;text&#8217;
control closest to them. This allows controls to be referenced by:</p>
<div class="highlight-python"><pre>app.dlg.&lt;Nearby_text&gt;&lt;Window_class&gt;</pre>
</div>
<p>e.g. to reference the &#8220;Footer&#8221; edit control in the Page Setup dialog
you could use:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">app</span><span class="o">.</span><span class="n">PageSetup</span><span class="o">.</span><span class="n">FooterEdit</span>
</pre></div>
</div>
</li>
<li><p class="first">Added a MoveWindow method to HwndWrapper</p>
</li>
<li><p class="first">Did some more cleanup (fixing pylint warnings) but still not finished</p>
</li>
<li><p class="first">Added some better support for .NET controls (not to be considered final)</p>
</li>
</ul>
</div>
<div class="section" id="many-changes-few-visible">
<h2>0.1.3 Many changes, few visible<a class="headerlink" href="#many-changes-few-visible" title="Permalink to this headline">¶</a></h2>
<p>15-Jan-2006</p>
<ul>
<li><p class="first">Wrote doc strings for all modules, classes and functions</p>
</li>
<li><p class="first">Ran pychecker and pylint and fixed some errors/warning</p>
</li>
<li><p class="first">changed</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">_connect</span><span class="p">,</span> <span class="n">_start</span><span class="p">,</span> <span class="n">_window</span><span class="p">,</span> <span class="n">_control</span><span class="p">,</span> <span class="n">_write</span>
</pre></div>
</div>
<p>respectively to</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">connect_</span><span class="p">,</span> <span class="n">start_</span><span class="p">,</span> <span class="n">window_</span><span class="p">,</span> <span class="n">connect_</span><span class="p">,</span> <span class="n">write_</span>
</pre></div>
</div>
<p>If you forget to change <tt class="docutils literal"><span class="pre">_window</span></tt>, <tt class="docutils literal"><span class="pre">_connect</span></tt> and <tt class="docutils literal"><span class="pre">_start</span></tt> then you will probably get the following error.</p>
<div class="highlight-python"><pre>TypeError: '_DynamicAttributes' object is not callable</pre>
</div>
</li>
<li><p class="first">pywinauto is now a package name - you need to import it or its modules</p>
</li>
<li><p class="first">Changes to the code to deal with pywinauto package name</p>
</li>
<li><p class="first">Fixed searching for windows if a Parent is passed in</p>
</li>
<li><p class="first">Added Index to retrieved MenuItem dictionary</p>
</li>
<li><p class="first">Added a check to ensure that a windows Handle is a valid window</p>
</li>
<li><p class="first">Refactored some of the methods in common_controls</p>
</li>
<li><p class="first">Refactored how FriendlyClassName is discovered (and still not really happy!</p>
</li>
</ul>
</div>
<div class="section" id="add-readme-and-rollup-various-changes">
<h2>0.1.2 Add Readme and rollup various changes<a class="headerlink" href="#add-readme-and-rollup-various-changes" title="Permalink to this headline">¶</a></h2>
<p>15-Jan-2006</p>
<ul class="simple">
<li>Updated Readme (original readme was incorrect)</li>
<li>Added clipboard module</li>
<li>Fixed DrawOutline part of tests.__init__.print_bugs</li>
<li>Added a NotifyParent to HwndWrapper</li>
<li>Make sure that HwndWrapper.ref is initialized to None</li>
<li>Refactored some methods of ComboBox and ListBox</li>
<li>Updated Combo/ListBox selection methods</li>
<li>Removed hardcoded paths from test_application.py</li>
<li>Added section to save the document as UTF-8 in MinimalNotepadTest</li>
<li>Fixed EscapeSpecials and UnEscapeSpecials in XMLHelpers</li>
<li>Made sure that overly large bitmaps do not break XML writing</li>
</ul>
</div>
<div class="section" id="minor-bug-fix-release">
<h2>0.1.1 Minor bug fix release<a class="headerlink" href="#minor-bug-fix-release" title="Permalink to this headline">¶</a></h2>
<p>12-Jan-2006</p>
<ul class="simple">
<li>Fixed some minor bugs discovered after release</li>
</ul>
</div>
<div class="section" id="initial-release">
<h2>0.1.0 Initial Release<a class="headerlink" href="#initial-release" title="Permalink to this headline">¶</a></h2>
<p>6-Jan-2006</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Change Log</a><ul>
<li><a class="reference internal" href="#various-cleanup-and-bug-fixes">0.4.0 Various cleanup and bug fixes.</a></li>
<li><a class="reference internal" href="#experimental-new-sendkeys-and-various-fixes">0.3.9 Experimental! New Sendkeys, and various fixes</a></li>
<li><a class="reference internal" href="#collecting-improvements-from-last-2-years">0.3.8 Collecting improvements from last 2 years</a></li>
<li><a class="reference internal" href="#merge-of-wait-changes-and-various-bug-fixes-improvements">0.3.7 Merge of Wait changes and various bug fixes/improvements</a></li>
<li><a class="reference internal" href="#b-changes-not-documented-in-0-3-6-history">0.3.6b Changes not documented in 0.3.6 history</a></li>
<li><a class="reference internal" href="#scrolling-and-treview-item-clicking-added">0.3.6 Scrolling and Treview Item Clicking added</a></li>
<li><a class="reference internal" href="#moved-to-metaclass-control-wrapping">0.3.5 Moved to Metaclass control wrapping</a></li>
<li><a class="reference internal" href="#fixed-issue-with-latest-ctypes-speed-gains-other-changes">0.3.4 Fixed issue with latest ctypes, speed gains, other changes</a></li>
<li><a class="reference internal" href="#added-some-methods-and-fixed-some-small-bugs">0.3.3 Added some methods, and fixed some small bugs</a></li>
<li><a class="reference internal" href="#fixed-setup-py-and-some-typos">0.3.2 Fixed setup.py and some typos</a></li>
<li><a class="reference internal" href="#performance-tune-ups">0.3.1 Performance tune-ups</a></li>
<li><a class="reference internal" href="#added-application-data-now-useful-for-localization-testing">0.3.0 Added Application data - now useful for localization testing</a></li>
<li><a class="reference internal" href="#more-refactoring-more-tests">0.2.5 More refactoring, more tests</a></li>
<li><a class="reference internal" href="#small-release-number-big-changes">0.2.1 Small Release number - big changes</a></li>
<li><a class="reference internal" href="#significant-refactoring">0.2.0 Significant refactoring</a></li>
<li><a class="reference internal" href="#many-changes-few-visible">0.1.3 Many changes, few visible</a></li>
<li><a class="reference internal" href="#add-readme-and-rollup-various-changes">0.1.2 Add Readme and rollup various changes</a></li>
<li><a class="reference internal" href="#minor-bug-fix-release">0.1.1 Minor bug fix release</a></li>
<li><a class="reference internal" href="#initial-release">0.1.0 Initial Release</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="TODO.html"
                        title="previous chapter">PYWINAUTO TODO&#8217;s</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="code/code.html"
                        title="next chapter">Main user modules</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/HISTORY.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="code/code.html" title="Main user modules"
             >next</a> |</li>
        <li class="right" >
          <a href="TODO.html" title="PYWINAUTO TODO’s"
             >previous</a> |</li>
        <li><a href="contents.html">pywinauto v0.4.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Mark Mc Mahon.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>